import type { WechatopenUsers, WechatopenUsersResponse } from '../wechatopen_users/hometypes.js';
import type { ComponentSetting, ComponentSettingResponse } from './types.js';
import { requestClient } from '#/api/request';


export const getWechatopenUserList = async (page: number, pageSize: number,
  params?: any,) => {
  return requestClient.get<WechatopenUsersResponse>(`/wechatopen_users/${pageSize}/${page}`, { params },
  );
};

export const getComponentSettingList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<ComponentSettingResponse>(`/component_setting/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const initSetting = async () => {
  return requestClient.post<ComponentSetting[]>('/component_setting/initSetting');
};
